﻿using System.ComponentModel;
using RaytracerLib.RenderableObjects;
using RaytracerLib.UVMappers;

namespace Raytracer.PropertyGridDecorators
{
    public class SuperquadricObjectProperties : RenderableObjectProperties
    {
        private SuperquadricObject m_superquadric;

        public SuperquadricObjectProperties(SuperquadricObject a_superquadric) :
            base(a_superquadric)
        {
            m_superquadric = a_superquadric;
        }

        [Category(Categories.PROPERTIES)]
        [TypeConverter(typeof(Vector3Converter))]
        public Vector3Properties Exponents
        {
            get
            {
                return new Vector3Properties(() => m_superquadric.Exponents, (v) => m_superquadric.Exponents = v);
            }
            set
            {
                m_superquadric.Exponents = value.ToVector3();
            }
        }
    }
}